package com.rd.teacher.jichao.day18;

import java.io.*;

public class TestConvert {

    public static void main(String[] args) throws Exception {
        File file = new File("stream.txt");
        // 字节流可以转化为字符流
        InputStream is = new FileInputStream(file);
        Reader reader = new InputStreamReader(is);
        char[] arr = new char[(int) file.length()];
        reader.read(arr);
        System.out.println(new String(arr));

        reader.close();
        is.close();
    }
}
